home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr25 / gg243774.zip / PWFOLDER.ZIP / PWFOLDER.SC < prev    next >
Text File  |  1992-04-03  |  7KB  |  213 lines

  1.  
  2. # This file was generated by the SOM Compiler.
  3. # FileName: pwfolder.sc.
  4. # Generated using:
  5. #     SOM Precompiler spc: 1.22
  6. #     SOM Emitter emitcsc: 1.10
  7. #include "wpfolder.sc"
  8.  
  9. class: PWFolder, 
  10.     file stem = pwfolder, external prefix = pwfolder_, class prefix = pwfoldercls_, 
  11.     major version = 1, minor version = 1, local;
  12.  
  13.     --  PWFolder is a Password protected folder.
  14.     --  It is derived as follows:
  15.     --         SOMOject
  16.     --           - WPObject
  17.     --              - WPFileSystem
  18.     --                 - WPFolder
  19.     --                    - PWFolder
  20.  
  21.  
  22. parent class: WPFolder;
  23.  
  24.  
  25. release order:
  26.     LockFolder, QueryInfo, SetInfo;
  27.  
  28.  
  29. passthru: C.h, after;
  30.  
  31. #define DebugBox(title, text)  WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, \
  32.                                (PSZ) text , (PSZ) title, 0, \
  33.                                MB_OK | MB_INFORMATION )
  34.  
  35. endpassthru;
  36. methods:
  37.  
  38.  
  39.     BOOL    LockFolder();
  40.  
  41.     -- 
  42.     --   METHOD:   LockFolder                                  PUBLIC
  43.     -- 
  44.     --   PURPOSE:  Invalidates the current password, thereby locking the folder.
  45.     -- 
  46.     --   INVOKED:  From _wpMenuItemSelected
  47.     -- 
  48.  
  49.     override wpInitData;
  50.  
  51.     -- 
  52.     --   METHOD:   wpInitData                                  PUBLIC
  53.     -- 
  54.     --   PURPOSE:  Initializes instance data
  55.     -- 
  56.     --   INVOKED:  By Workplace Shell, upon instantiation of the object instance.
  57.     -- 
  58.  
  59.     override wpModifyPopupMenu;
  60.  
  61.     -- 
  62.     --   METHOD:   wpModifyPopupMenu                           PUBLIC
  63.     -- 
  64.     --   PURPOSE:  Adds an additional "Lock" item to the object's context menu.
  65.     -- 
  66.     --   INVOKED:  By Workplace Shell, upon instantiation of the object instance.
  67.     -- 
  68.  
  69.     override wpMenuItemSelected;
  70.  
  71.     -- 
  72.     --   METHOD:   wpMenuItemSelected                          PUBLIC
  73.     -- 
  74.     --   PURPOSE:  Processes the user's selections from the context menu.  The
  75.     --             overridden method processes only the added "Lock" item, before
  76.     --             invoking the parent's default processing to handle other items.
  77.     -- 
  78.     --   INVOKED:  By Workplace Shell, upon selection of a menu item by the user.
  79.     -- 
  80.  
  81.     override wpOpen;
  82.  
  83.     -- 
  84.     --   METHOD:   wpOpen                                      PUBLIC
  85.     -- 
  86.     --   PURPOSE:  Only allows a folder to be opened if the folder is unlocked, or
  87.     --             if the user supplies the correct password in response to the
  88.     --             dialog.
  89.     -- 
  90.     --   INVOKED:  By Workplace Shell, upon selection of the "Open" menu item by
  91.     --             the user.
  92.     -- 
  93.  
  94.     override wpSetTitle;
  95.  
  96.     -- 
  97.     --   METHOD:   wpSetTitle                                  PUBLIC
  98.     -- 
  99.     --   PURPOSE:  Sets the folder's title (icon text) to have the phrase <Locked>
  100.     --             as a suffix if the folder is locked, or removes this suffix if
  101.     --             the folder is unlocked.
  102.     -- 
  103.     --   INVOKED:  By wpOpen to set the unlocked state, and by LockFolder to set
  104.     --             the locked state.
  105.     -- 
  106.  
  107.     override wpSetup;
  108.  
  109.     -- 
  110.     --   METHOD:   wpSetup                                     PUBLIC
  111.     -- 
  112.     --   PURPOSE:  Sets folder properties based upon a setup string passed by the
  113.     --             object's creator as part of the WinCreateObject() call.  The
  114.     --             overridden method simply processes the PASSWORD keyword to set
  115.     --             the folder's password immediately upon instantiation, before
  116.     --             invoking the parent's default processing to handle all other
  117.     --             keywords.
  118.     -- 
  119.     --   INVOKED:  By the Workplace Shell, upon instantiation of the object
  120.     --             instance.
  121.     -- 
  122.  
  123.     override wpSaveState;
  124.  
  125.     -- 
  126.     --   METHOD:   wpSaveState                                 PUBLIC
  127.     -- 
  128.     --   PURPOSE:  Saves the object instance's persistent state data.  The
  129.     --             overridden method simply saves the password data, then invokes
  130.     --             the parent's default processing to handle any other instance
  131.     --             data defined by ancestor classes.
  132.     -- 
  133.     --   INVOKED:  By the Workplace Shell, when the object becomes dormant.
  134.     -- 
  135.  
  136.     override wpRestoreState;
  137.  
  138.     -- 
  139.     --   METHOD:   wpRestoreState                              PUBLIC
  140.     -- 
  141.     --   PURPOSE:  Restores the object instance's persistent state data.  The
  142.     --             overridden method simply restores the password data, then
  143.     --             invokes the parent's default processing to handle any other
  144.     --             instance data defined by ancestor classes.
  145.     -- 
  146.     --   INVOKED:  By the Workplace Shell, when the object becomes awake.
  147.     -- 
  148.  
  149.     override wpSetIcon;
  150.  
  151.     -- 
  152.     --   METHOD:   wpSetIcon                                   PUBLIC
  153.     -- 
  154.     --   PURPOSE:  This class method returns the handle to the correct icon for
  155.     --             the object.
  156.     -- 
  157.     --   INVOKED:
  158.     -- 
  159.  
  160.     override wpclsQueryTitle, class;
  161.  
  162.     -- 
  163.     --   METHOD:   wpclsQueryTitle                             PUBLIC
  164.     -- 
  165.     --   PURPOSE:  This class method returns the default folder title for any
  166.     --             instance of the password protected folder class.  This title
  167.     --             is used if a title is not supplied in the WinCreateObject()
  168.     --             call.
  169.     -- 
  170.     --   INVOKED:  By the Workplace Shell, upon instantiation of the object
  171.     --             instance.
  172.     -- 
  173.  
  174.     override wpclsInitData, class;
  175.  
  176.     -- 
  177.     --   METHOD:   wpclsInitData                               PUBLIC
  178.     -- 
  179.     --   PURPOSE:  This class method allows the initialization of any class data
  180.     --             items.  The overridden method simply obtains a module handle
  181.     --             to be used when accessing Presentation Manager resources, then
  182.     --             invokes the parent's default processing.
  183.     -- 
  184.     --   INVOKED:  By the Workplace Shell, upon loading the class DLL.
  185.     -- 
  186.  
  187.     override wpclsQueryIcon, class;
  188.  
  189.     -- 
  190.     --   METHOD:   wpclsQueryIcon                                 PUBLIC
  191.     -- 
  192.     --   PURPOSE:  This class method returns the handle to the default icon for
  193.     --             the class.  This method is not used in the current version,
  194.     --             but could be used if different icons are to be used for the
  195.     --             locked and unlocked states.
  196.     -- 
  197.     --   INVOKED:
  198.     -- 
  199.  
  200.     override wpclsUnInitData, class;
  201.  
  202.     -- 
  203.     --   METHOD:   wpclsUnInitData                             PUBLIC
  204.     -- 
  205.     --   PURPOSE:  This class method allows the release of any class data items
  206.     --             or resources.  The overridden method releases the module handle
  207.     --             obtained by wpclsInitData, then invokes the parent's default
  208.     --             processing.
  209.     -- 
  210.     --   INVOKED:  By the Workplace Shell, upon unloading the class DLL.
  211.     -- 
  212.  
  213.